/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:${USER}
 * Date:${YEAR}-${MONTH}-${DAY}
 * ${TIME}
 */
public class Main {
    public static void main(String[] args) {
        System.out.println("Hello world!");
    }
}
class Solution {
    public int[] twoSum(int[] price, int target) {
        int left=0,right=price.length-1;
        while(left<right){
            if(price[left]+price[right]<target){
                left++;
            }else if(price[left]+price[right]>target){
                right--;
            }else{
                return new int[] {price[left],price[right]};
            }
        }
        return new int[] {0};
    }
}